#Boa:Dialog:Dialog_CadastrarFatura

import wx

def create(parent):
    return Dialog_CadastrarFatura(parent)

[wxID_DIALOG_CADASTRARFATURA, wxID_DIALOG_CADASTRARFATURACHECKBOXDESCONTO, 
 wxID_DIALOG_CADASTRARFATURACHOICEFORMADEPAGAMENTO, 
 wxID_DIALOG_CADASTRARFATURALISTCTRLSERVICOS, 
 wxID_DIALOG_CADASTRARFATURAPANEL1, wxID_DIALOG_CADASTRARFATURASTATICTEXT1, 
 wxID_DIALOG_CADASTRARFATURASTATICTEXT2, 
 wxID_DIALOG_CADASTRARFATURASTATICTEXT3, 
 wxID_DIALOG_CADASTRARFATURASTATICTEXT4, 
 wxID_DIALOG_CADASTRARFATURASTATICTEXT5, 
 wxID_DIALOG_CADASTRARFATURASTATICTEXT6, 
 wxID_DIALOG_CADASTRARFATURASTATICTEXT7, 
 wxID_DIALOG_CADASTRARFATURASTATICTEXT8, 
 wxID_DIALOG_CADASTRARFATURASTATICTEXT9, 
 wxID_DIALOG_CADASTRARFATURASTATUSBAR1, 
 wxID_DIALOG_CADASTRARFATURATEXTCTRLDESCONTO, 
 wxID_DIALOG_CADASTRARFATURATEXTCTRLFUNCIONARIO, 
 wxID_DIALOG_CADASTRARFATURATEXTCTRLTOTAL, 
 wxID_DIALOG_CADASTRARFATURATEXTCTRL_CLIENTE, 
 wxID_DIALOG_CADASTRARFATURATEXTCTRL_ID, wxID_DIALOG_CADASTRARFATURATOOLBAR1, 
 wxID_DIALOG_CADASTRARFATURAWINDOW1, wxID_DIALOG_CADASTRARFATURAWINDOW2, 
] = [wx.NewId() for _init_ctrls in range(23)]

[wxID_DIALOG_CADASTRARFATURATOOLBAR1TOOLSPROXIMO] = [wx.NewId() for _init_coll_toolBar1_Tools in range(1)]

class Dialog_CadastrarFatura(wx.Dialog):
    def _init_coll_toolBar1_Tools(self, parent):
        # generated method, don't edit

        parent.DoAddTool(bitmap=wx.Bitmap(u"Imagens/Next.gif",
              wx.BITMAP_TYPE_GIF),
              bmpDisabled=wx.Bitmap(u"Imagens/Next.gif",
              wx.BITMAP_TYPE_GIF),
              id=wxID_DIALOG_CADASTRARFATURATOOLBAR1TOOLSPROXIMO,
              kind=wx.ITEM_NORMAL, label='', longHelp='',
              shortHelp=u'Pr\xf3ximo')
        self.Bind(wx.EVT_TOOL, self.OnToolBar1ToolsproximoTool,
              id=wxID_DIALOG_CADASTRARFATURATOOLBAR1TOOLSPROXIMO)

        parent.Realize()

    def _init_coll_listCtrlServicos_Columns(self, parent):
        # generated method, don't edit

        parent.InsertColumn(col=0, format=wx.LIST_FORMAT_LEFT, heading=u'Nome',
              width=-2)
        parent.InsertColumn(col=1, format=wx.LIST_FORMAT_LEFT,
              heading=u'Pre\xe7o Utilizado', width=-2)

    def _init_coll_statusBar1_Fields(self, parent):
        # generated method, don't edit
        parent.SetFieldsCount(1)

        parent.SetStatusText(number=0, text=u'Nova Fatura')

        parent.SetStatusWidths([-1])

    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Dialog.__init__(self, id=wxID_DIALOG_CADASTRARFATURA,
              name=u'Dialog_CadastrarFatura', parent=prnt, pos=wx.Point(328, 4),
              size=wx.Size(456, 637), style=wx.DEFAULT_DIALOG_STYLE,
              title=u'Gerar Fatura')
        self.SetClientSize(wx.Size(440, 599))
        self.SetBackgroundColour(wx.Colour(255, 255, 255))

        self.staticText1 = wx.StaticText(id=wxID_DIALOG_CADASTRARFATURASTATICTEXT1,
              label=u'<Agendamento>', name='staticText1', parent=self,
              pos=wx.Point(8, 8), size=wx.Size(97, 16), style=0)
        self.staticText1.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL,
              False, u'Tahoma'))

        self.panel1 = wx.Panel(id=wxID_DIALOG_CADASTRARFATURAPANEL1,
              name='panel1', parent=self, pos=wx.Point(0, 32), size=wx.Size(440,
              536), style=wx.TAB_TRAVERSAL)

        self.toolBar1 = wx.ToolBar(id=wxID_DIALOG_CADASTRARFATURATOOLBAR1,
              name='toolBar1', parent=self.panel1, pos=wx.Point(0, 0),
              size=wx.Size(440, 30), style=wx.TB_HORIZONTAL | wx.NO_BORDER)
        self.toolBar1.SetToolSeparation(0)

        self.window1 = wx.Window(id=wxID_DIALOG_CADASTRARFATURAWINDOW1,
              name='window1', parent=self, pos=wx.Point(0, 576),
              size=wx.Size(440, 32), style=0)

        self.statusBar1 = wx.StatusBar(id=wxID_DIALOG_CADASTRARFATURASTATUSBAR1,
              name='statusBar1', parent=self.window1, style=0)
        self._init_coll_statusBar1_Fields(self.statusBar1)

        self.window2 = wx.Window(id=wxID_DIALOG_CADASTRARFATURAWINDOW2,
              name='window2', parent=self.panel1, pos=wx.Point(16, 40),
              size=wx.Size(408, 488), style=0)
        self.window2.SetBackgroundColour(wx.Colour(250, 250, 250))

        self.textCtrl_ID = wx.TextCtrl(id=wxID_DIALOG_CADASTRARFATURATEXTCTRL_ID,
              name=u'textCtrl_ID', parent=self.window2, pos=wx.Point(16, 40),
              size=wx.Size(80, 21), style=0, value=u'')
        self.textCtrl_ID.Enable(False)

        self.staticText2 = wx.StaticText(id=wxID_DIALOG_CADASTRARFATURASTATICTEXT2,
              label=u'ID', name='staticText2', parent=self.window2,
              pos=wx.Point(16, 24), size=wx.Size(14, 16), style=0)
        self.staticText2.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD,
              False, u'Tahoma'))

        self.textCtrl_Cliente = wx.TextCtrl(id=wxID_DIALOG_CADASTRARFATURATEXTCTRL_CLIENTE,
              name=u'textCtrl_Cliente', parent=self.window2, pos=wx.Point(144,
              40), size=wx.Size(248, 21), style=0, value=u'')
        self.textCtrl_Cliente.Enable(False)

        self.staticText3 = wx.StaticText(id=wxID_DIALOG_CADASTRARFATURASTATICTEXT3,
              label=u'Cliente', name='staticText3', parent=self.window2,
              pos=wx.Point(144, 24), size=wx.Size(44, 16), style=0)
        self.staticText3.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD,
              False, u'Tahoma'))

        self.textCtrlFuncionario = wx.TextCtrl(id=wxID_DIALOG_CADASTRARFATURATEXTCTRLFUNCIONARIO,
              name=u'textCtrlFuncionario', parent=self.window2, pos=wx.Point(16,
              96), size=wx.Size(232, 21), style=0, value=u'')
        self.textCtrlFuncionario.Enable(False)

        self.staticText4 = wx.StaticText(id=wxID_DIALOG_CADASTRARFATURASTATICTEXT4,
              label=u'Funcion\xe1rio', name='staticText4', parent=self.window2,
              pos=wx.Point(16, 80), size=wx.Size(73, 16), style=0)
        self.staticText4.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD,
              False, u'Tahoma'))

        self.staticText5 = wx.StaticText(id=wxID_DIALOG_CADASTRARFATURASTATICTEXT5,
              label=u'Servi\xe7os', name='staticText5', parent=self.window2,
              pos=wx.Point(16, 136), size=wx.Size(55, 16), style=0)
        self.staticText5.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD,
              False, u'Tahoma'))

        self.listCtrlServicos = wx.ListCtrl(id=wxID_DIALOG_CADASTRARFATURALISTCTRLSERVICOS,
              name=u'listCtrlServicos', parent=self.window2, pos=wx.Point(16,
              152), size=wx.Size(376, 200), style=wx.LC_REPORT)
        self._init_coll_listCtrlServicos_Columns(self.listCtrlServicos)

        self.textCtrlDesconto = wx.TextCtrl(id=wxID_DIALOG_CADASTRARFATURATEXTCTRLDESCONTO,
              name=u'textCtrlDesconto', parent=self.window2, pos=wx.Point(170,
              360), size=wx.Size(67, 21), style=0, value=u'')
        self.textCtrlDesconto.Center(wx.HORIZONTAL)
        self.textCtrlDesconto.SetMaxLength(0)
        self.textCtrlDesconto.Enable(False)

        self.staticText7 = wx.StaticText(id=wxID_DIALOG_CADASTRARFATURASTATICTEXT7,
              label=u'R$', name='staticText7', parent=self.window2,
              pos=wx.Point(248, 392), size=wx.Size(14, 16), style=0)

        self.staticText8 = wx.StaticText(id=wxID_DIALOG_CADASTRARFATURASTATICTEXT8,
              label=u'Total:', name='staticText8', parent=self.window2,
              pos=wx.Point(112, 392), size=wx.Size(38, 16), style=0)
        self.staticText8.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD, True,
              u'Tahoma'))
        self.staticText8.SetForegroundColour(wx.Colour(255, 0, 0))

        self.checkBoxDesconto = wx.CheckBox(id=wxID_DIALOG_CADASTRARFATURACHECKBOXDESCONTO,
              label=u'Desconto:', name=u'checkBoxDesconto', parent=self.window2,
              pos=wx.Point(64, 360), size=wx.Size(88, 21), style=0)
        self.checkBoxDesconto.SetValue(False)
        self.checkBoxDesconto.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD,
              False, u'Tahoma'))
        self.checkBoxDesconto.Bind(wx.EVT_CHECKBOX,
              self.OnCheckBoxDescontoCheckbox,
              id=wxID_DIALOG_CADASTRARFATURACHECKBOXDESCONTO)

        self.textCtrlTotal = wx.TextCtrl(id=wxID_DIALOG_CADASTRARFATURATEXTCTRLTOTAL,
              name=u'textCtrlTotal', parent=self.window2, pos=wx.Point(168,
              392), size=wx.Size(72, 21), style=0, value=u'')
        self.textCtrlTotal.Enable(False)

        self.staticText6 = wx.StaticText(id=wxID_DIALOG_CADASTRARFATURASTATICTEXT6,
              label=u'R$', name='staticText6', parent=self.window2,
              pos=wx.Point(248, 360), size=wx.Size(14, 16), style=0)

        self.staticText9 = wx.StaticText(id=wxID_DIALOG_CADASTRARFATURASTATICTEXT9,
              label=u'*Forma de Pagamento:', name='staticText9',
              parent=self.window2, pos=wx.Point(8, 432), size=wx.Size(149, 16),
              style=0)
        self.staticText9.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD,
              False, u'Tahoma'))

        self.choiceFormaDePagamento = wx.Choice(choices=[],
              id=wxID_DIALOG_CADASTRARFATURACHOICEFORMADEPAGAMENTO,
              name=u'choiceFormaDePagamento', parent=self.window2,
              pos=wx.Point(168, 432), size=wx.Size(144, 21), style=0)

        self._init_coll_toolBar1_Tools(self.toolBar1)

    def __init__(self, parent):
        self._init_ctrls(parent)

    def OnToolBar1ToolsproximoTool(self, event):
        event.Skip()

    def OnCheckBoxDescontoCheckbox(self, event):
        if self.checkBoxDesconto.GetValue() == True:
            self.textCtrlDesconto.Enable(True)
        
        else:
            self.textCtrlDesconto.SetValue('')
            self.textCtrlDesconto.Enable(False)
